Skip to content

fix a little code example issue #12186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 17, 2019
Merged

fix a little code example issue #12186

merged 1 commit into from
Aug 17, 2019

Conversation

padabou
Copy link
Contributor

@padabou padabou commented Aug 16, 2019

change : {% set route_name = app.request.attributes('_route') %}
{% set route_parameters = app.request.attributes('_route_params') %}

by :
{% set route_name = app.request.attributes.get('_route') %}
{% set route_parameters = app.request.attributes.get('_route_params') %}

change : {% set route_name = app.request.attributes('_route') %}
{% set route_parameters = app.request.attributes('_route_params') %}

by : 
{% set route_name = app.request.attributes.get('_route') %}
{% set route_parameters = app.request.attributes.get('_route_params') %}
@wouterj
Copy link
Member

wouterj commented Aug 17, 2019

Thank you for catching & taking the time to fix this bug! The AttributeBag indeed requires to call the get() method to get attributes. I've merged this in 4.3 and we'll take care of bringing it to newer versions from there.

wouterj added a commit that referenced this pull request Aug 17, 2019
This PR was merged into the 4.3 branch.

Discussion
----------

fix a little code example issue

change : {% set route_name = app.request.attributes('_route') %}
{% set route_parameters = app.request.attributes('_route_params') %}

by :
{% set route_name = app.request.attributes.get('_route') %}
{% set route_parameters = app.request.attributes.get('_route_params') %}

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

1d2d9c3 fix a little code example issue
@wouterj wouterj merged commit 1d2d9c3 into symfony:4.3 Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants